
<div class="tab-pane" id="shareset">

    <div class="panel panel-default" role="tabpanel" style="">
        <div class="panel-heading">海报设计</div>
        <div class="panel-body" style="">
            {include file='poster_theme'}
        </div>
    </div>
    <div class="panel panel-default" role="tabpanel" style="">
        <div class="panel-heading">分享设置</div>
        <div class="panel-body" style="">
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">海报大小</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="poster_size" value="0" {if $config['poster_size']==0} checked="checked"{/if} type="radio"> 标准（1080*1701）
                    </label>
                    <label class="radio-inline">
                        <input name="poster_size" value="1" {if $config['poster_size']==1} checked="checked"{/if} type="radio"> 大屏（1080*2160)
                    </label>
                    <label class="radio-inline">
                        <input name="poster_size" value="2" {if $config['poster_size']==2} checked="checked"{/if} type="radio"> 全屏（1080*2330)
                    </label>
                </div>
            </div>
            <div class="form-group" id="shareStyle">
                <label class="col-sm-2 col-xs-12 control-label">分享样式</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12" >
                    <label class="radio-inline">
                        <input name="pageshare" value="0" {if $config['pageshare']==0} checked="checked"{/if} type="radio" > 分享+海报
                    </label>
                    <label class="radio-inline">
                        <input name="pageshare" value="1" {if $config['pageshare']==1} checked="checked"{/if} type="radio"> 直接显示海报
                    </label>
                    <label class="radio-inline">
                        <input name="pageshare" value="2" {if $config['pageshare']==2} checked="checked"{/if} type="radio"> 分享朋友圈文字+海报
                    </label>
                    <label class="radio-inline">
                        <input name="pageshare" value="3" {if $config['pageshare']==3} checked="checked"{/if} type="radio"> 分享朋友圈文字(黑金）
                    </label>
                </div>
            </div>
            <div class="form-group share01">
                <label class="col-sm-2 col-xs-12 control-label">海报文字</label>
                <div class="col-sm-8 col-xs-12">
                    <textarea rows="5" cols="50" class="form-control"  name="pageshare_txt">{$config['pageshare_txt']}</textarea>
                    <span class="help-block">支持通配符:#nickname当前用户昵称 #username当前用户姓名；</span>
                    <span class="help-block">表情符号请用微信编辑好粘贴至此即可,常用：[庆祝][烟花][呲牙][色][蛋糕][礼物][红包][福][爆竹]；</span>
                </div>
            </div>

            <div class="form-group share02">
                <label class="col-sm-2 col-xs-12 control-label">顶部图片</label>
                <div class="col-sm-8 col-xs-12">
                    {php echo view_form_field_image('pageshare_title',$config['pageshare_title']);}
                    {if $config['pageshare']==2}
                    <span class="help-block">如需更换文字，<a href="https://css2020.yixuan.net/2020css/yx2020/images/share00.psd" target="_blank"  style="font-weight: 500;">请下载模版替换</a></span>
                    {elseif $config['pageshare']==3}
                    <span class="help-block">如需更换文字，<a href="https://css2020.yixuan.net/2020css/mystery_boxes_feichi/images/mh_share_top.psd" target="_blank" style="font-weight: 500;">请下载模版替换</a></span>
                    {/if}
                </div>
            </div>
            <div class="form-group share03">
                <label class="col-sm-2 control-label">引导文字1</label>
                <div class="col-sm-9 col-xs-12">
                    <input type="text" class="form-control" name="poster_tips1" value="{$poster['poster_tips1']}">
                </div>
            </div>
            <div class="form-group share04">
                <label class="col-sm-2 control-label">引导文字2</label>
                <div class="col-sm-9 col-xs-12">
                    <input type="text" class="form-control" name="poster_tips2" value="{$poster['poster_tips2']}">
                </div>
            </div>
            <div class="form-group share05">
                <label class="col-sm-2 col-xs-12 control-label">海报分享引导图</label>
                <div class="col-sm-8 col-xs-12">
                    {php echo view_form_field_image('pageshare_topimg',$config['pageshare_topimg']);}
                    <span class="help-block">如需更换文字，<a href="https://css2020.yixuan.net/2019css/default/images/fenxiao.psd" target="_blank" style="font-weight: 500;">请下载模版替换</a></span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">标题中显示客服</label>
                <div class="col-sm-9 col-md-8 col-lg-8 col-xs-12">
                    <label class="radio-inline">
                        <input name="isshowkefu" value="0" {if $config['isshowkefu']==0} checked="checked"{/if} type="radio"> 关闭
                    </label>
                    <label class="radio-inline">
                        <input name="isshowkefu" value="1" {if $config['isshowkefu']==1 || !isset($config['isshowkefu'])} checked="checked"{/if} type="radio"> 开启
                    </label>
                    <span class="help-block">分享出去的链接,标题中显示客服信息</span>
                </div>
            </div>
        </div>
    </div>

    <script>
        const checkedInput = $('#shareStyle input:checked')
        const initVal = checkedInput.val()
        shareStyleHandle(checkedInput, initVal);
        $('#shareStyle input').change(function(){
            const val = $(this).val()
            shareStyleHandle($(this), val)
        })
        function shareStyleHandle(el,val) {
            if(val == 2 || val == 3) {
                el.parents('#shareStyle').next().show()
                el.parents('#shareStyle').next().next().show()
                el.parents('#shareStyle').next().next().next().hide()
                el.parents('#shareStyle').next().next().next().next().hide()
                {if $system['wxapp']==0 || $system['softmode']!=1}
                el.parents('#shareStyle').next().next().next().next().next().show()
                {/if}
            }else if(val == 1) {
                el.parents('#shareStyle').next().hide()
                el.parents('#shareStyle').next().next().hide()
                el.parents('#shareStyle').next().next().next().hide()
                el.parents('#shareStyle').next().next().next().next().hide()
                el.parents('#shareStyle').next().next().next().next().next().hide()
            }else {
                el.parents('#shareStyle').next().hide()
                el.parents('#shareStyle').next().next().hide()
                el.parents('#shareStyle').next().next().next().show()
                el.parents('#shareStyle').next().next().next().next().show()
                el.parents('#shareStyle').next().next().next().next().next().hide()
            }
        }

    </script>
    {if $system['wxapp']==0 || $system['softmode']!=1 }
    <div class="panel panel-default" role="tabpanel" style="">
        <div class="panel-heading">H5分享</div>
        <div class="panel-body" style="">
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">未支付分享标题</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="sharetitle1"  value="{$config['sharetitle1']}">
                    <span class="help-block">未报名的客户分享时的标题，NICK表示昵称,SHOPNAME表示商家名称,WORKER表示员工名称</span>
                    <span class="help-block">为空时为主标题，如：红黄蓝亲子中心10周年店庆【老师：WORKER】</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">已支付分享标题</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="sharetitle2"  value="{$config['sharetitle2']}">
                    <span class="help-block">支付的客户分享时的标题，NICK表示昵称，NAME表示姓名,SHOPNAME表示商家名称,WORKER表示员工名称</span>
                    <span class="help-block">为空时为主标题，如：红黄蓝亲子中心10周年店庆【老师：WORKER】</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">分享图标</label>
                <div class="col-sm-8 col-xs-12">
                    {php echo view_form_field_image('img',$theme['img']);}
                    <span class="help-block">分享图标，建议100*100,为空时为活动主图</span>
                </div>
            </div>
        </div>
    </div>
    {/if}
    {if $system['wxapp']!=0 && $system['softmode']!=0 }
    <div class="panel panel-default" role="tabpanel" style="">
        <div class="panel-heading">小程序分享</div>
        <div class="panel-body" style="">
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">{php echo $system['ruanjian']==10?'好友分享标题':'未支付分享标题';}</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="sharetitlexcx"  value="{$config['sharetitlexcx']}">
                    {if $system['ruanjian']==10}
                    <span class="help-block">好友的分享标题，FANSNICK表示昵称，FANSNAME表示姓名，USERNAME表示客片主人名,SHOPNAME表示商家名称,WORKER表示员工名称</span>
                    {else}
                    <span class="help-block">未报名的客户分享时的标题，NICK表示昵称,SHOPNAME表示商家名称,WORKER表示员工名称</span>
                    <span class="help-block">为空时为主标题，如：红黄蓝亲子中心10周年店庆【老师：WORKER】</span>
                    {/if}
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">{php echo $system['ruanjian']==10?'客户分享标题':'已支付分享标题';}</label>
                <div class="col-sm-8 col-xs-12">
                    <input type="text" class="form-control"  placeholder="" name="sharetitlexcx2"  value="{$config['sharetitlexcx2']}">
                    {if $system['ruanjian']!=10}
                    <span class="help-block">支付的客户分享时的标题，NICK表示昵称，NAME表示姓名,SHOPNAME表示商家名称,WORKER表示员工名称</span>
                    <span class="help-block">为空时为主标题，如：红黄蓝亲子中心10周年店庆【老师：WORKER】</span>
                    {/if}
                </div>
            </div>
            {if $system['ruanjian']!=10}
            <div class="form-group">
                <label class="col-sm-2 col-xs-12 control-label">分享图片</label>
                <div class="col-sm-8 col-xs-12">
                    {php echo view_form_field_image('shareimgxcx',$config['shareimgxcx']);}
                    <span class="help-block">分享图片，建议1000*800,为空时为活动主图，图片宽高比例为5:4</span>
                </div>
            </div>
            {/if}
        </div>
    </div>
    {/if}

</div>